module.exports.dirName = (mimetype) => {
  let dir = "others"
  switch (mimetype) {
    case "image/jpeg":
    case "image/jp2":
    case "image/bmp":
    case "image/png":
    case "image/gif":
    case "image/webp":
    case "image/x-icon":
    case "image/vnd.microsoft.icon":
      dir = "images"
      break;
    case "application/kswps":
    case "application/msword":
    case "application/vnd.openxmlformats-officedocument.wordprocessingml.document":
      dir = "docs"
      break;
    case "application/pdf":
      dir = "pdfs"
      break
    case "application/zip":
    case "application/rar":
    case "application/x-tar":
    case "application/x-gzip":
    case "application/x-zip-compressed":
    case "application/x-compressed":
      dir = "zips"
      break
  }
  return dir
}